<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>日志管理</title>
		<link rel="stylesheet" href="__PUBLIC__/frame/layui/css/layui.css">
		<!--<link rel="stylesheet" href="http://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css">-->
		<link rel="stylesheet" href="__PUBLIC__/frame/static/css/style.css">
	</head>
	<body>
    	<a class="layui-btn btn-add btn-default" id="btn-refresh"style="margin-top: 10px;"><i class="layui-icon">&#x1002;</i></a>
        <form class="layui-form" id="search_form" action="__SELF__" method="post">
            <div class="layui-form-item" style="margin-top:10px;">
                <div class="layui-inline">
                    <label class="layui-form-label">员工姓名：</label>
                    <div class="layui-input-inline">
                        <select name="user_id" class="clean" lay-verify="" lay-search="">
                            <option value="">直接选择或搜索选择</option>
<?php foreach ($list['admin'] as $k => $v):
if($v['id']==$search['user_id'])
    $select = 'selected="selected"';
else
    $select = '';
?>
                            <option {$select} value="{$v['id']}">{$v['nickname']}</option>
<?php endforeach;?>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">关键词：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="keyword" lay-verify="" autocomplete="off" class="layui-input clean" value="<?php echo $search['keyword'];?>">
                    </div>
                </div>
                <div class="layui-inline">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1"><i class="layui-icon">&#xe615;</i></button>
                </div>
            </div>
        </form>
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
            <legend>日志列表</legend>
        </fieldset>
    	<table class="layui-table" border="" cellspacing="" cellpadding="" width="100%">
    		<thead>
    			<tr>
    				<td width="20%">操作员工</td>
    				<td width="20%">操作IP</td>   				
    				<td width="40%">操作内容</td>
                    <td width="20%">操作时间</td>
    			</tr>
    		</thead>
            <tbody>
<?php foreach ($list['list'] as $k => $v):?>
            	<tr>
            		<td>{$v['active_name']}</td>
            		<td>{$v['active_ip']}</td>
            		<td title="{$v['active_content']}"  style="white-space: nowrap;text-overflow:ellipsis;">{$v['active_content']}</td>
                    <td>{$v['active_time']}</td>
            	</tr>
<?php endforeach;?> 
<?php if(preg_match('/\d/', $list['page'])): ?>  
        <tr><td align="right" nowrap="true" colspan="99" height="30" class="page"><?php echo $list['page']; ?></td></tr> 
<?php endif; ?>
            </tbody>
    	</table>
		
		
	</body>
	<script type="text/javascript" src="__PUBLIC__/hawk/js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/frame/layui/layui.js"></script>
	<script>
              // 刷新
        $(document).on('click','#btn-refresh',function(){
            // $('.clean option').eq(0).attr('selected','selected').siblings().removeAttr('selected');
            location.reload();
        });
        layui.use(['layer','upload','form'], function () {

        // 操作对象
        var layer       = layui.layer
            ,upload     = layui.upload
            ,form       = layui.form
            ,$          = layui.jquery;
        });
	
	</script>
</html>
